#include<vector>
#include<iostream>
using namespace std;

int main()
{
	vector<int> v({ 1,2,3,4 });
	vector<int>::iterator it = find(v.begin(), v.end(), 2);

	v.erase(it);
	cout << *it << endl;
	return 0;
}
